package com.hfjyz.expert.expert.bean;

import com.hfjyz.base.util.CodeUtil;

public class ExpertExcelBean extends ExpertBean {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4199943623842048876L;

    private String sexValue = null;
    private String topEducationValue = null;
    private String educationTypeValue = null;

    public ExpertExcelBean() {
    }

    public ExpertExcelBean(ExpertBean expert) {
        this.address = expert.address;
        this.birthday = expert.birthday;
        this.cellPhone = expert.cellPhone;
        this.educationType = expert.educationType;
        this.educationTypeValue = CodeUtil.getEducationType(expert.educationType);
        this.graduatedFrom = expert.graduatedFrom;
        this.id = expert.id;
        this.idNo = expert.idNo;
        this.imAddress = expert.imAddress;
        this.judgeExperience = expert.judgeExperience;
        this.mailAddress = expert.mailAddress;
        this.name = expert.name;
        this.post = expert.post;
        this.researchAchievement = expert.researchAchievement;
        this.sex = expert.sex;
        this.sexValue = CodeUtil.getSexString(expert.sex);
        this.skillsCert = expert.skillsCert;
        this.socialWork = expert.socialWork;
        this.subject = expert.subject;
        this.title = expert.title;
        this.topEducation = expert.topEducation;
        this.topEducationValue = CodeUtil.getEducation(expert.topEducation);
        this.trainExperience = expert.trainExperience;
        this.workAddress = expert.workAddress;
        this.workExperience = expert.workExperience;
        this.workPhone = expert.workPhone;
        this.workUnit = expert.workUnit;
        this.photo = expert.photo;
        this.isSigned = expert.isSigned;
        this.remark = expert.remark;
        this.regDate = expert.getRegDate();
    }

    public String getSexValue() {
        return sexValue;
    }

    public void setSexValue(String sexValue) {
        setSex(CodeUtil.getSexCode(sexValue));
        this.sexValue = sexValue;
    }

    public String getTopEducationValue() {
        return topEducationValue;
    }

    public void setTopEducationValue(String topEducationValue) {
        setTopEducation(CodeUtil.getEducationCode(topEducationValue));
        this.topEducationValue = topEducationValue;
    }

    public String getEducationTypeValue() {
        return educationTypeValue;
    }

    public void setEducationTypeValue(String educationTypeValue) {
        setEducationType(CodeUtil.getEducationTypeCode(educationTypeValue));
        this.educationTypeValue = educationTypeValue;
    }

    public String getSignValue() {
        return signValue;
    }

    public void setSignValue(String signValue) {
        if (signValue == null || signValue.trim().isEmpty()) {
            setIsSigned(0);
        } else {
            setIsSigned(1);
        }
        this.signValue = signValue;
    }
}
